package operator;

public class Main {
    public static void main(String[] args) {
        int a = 3;
        int b = 10;
        System.out.println(a + b);

        double c = 3.5;
        System.out.println(a + c);//不同类型数据做运算，先将小范围的数据类型自动提升为大范围的
                                    //相当于3->3.0 3.0+3.5=6.5
        //+还能拼接字符串
        //通过+号拼接字符串是从左往右拼接
        System.out.println("java"+"是");
        System.out.println("5+5=" + 5 + 5);//5+5=55 ,先拼成 "5+5=5"+5,再拼成"5+5=55"
        System.out.println("5+5=" + (5 + 5));//5+5=10,先计算(5+5),最后再与 "5+5=" 拼接
        int i1 = 5,i2 = 2;
        System.out.println(i1 / i2);
        System.out.println(i1 % i2);


    }
}